<include file="Public:header" />
<script type="text/javascript">
    <!--
    $(function(){
        $.formValidator.initConfig({
            formid:"myform",
            autotip:true,
            onerror:function(msg,obj){
                window.top.art.dialog({
                    content:msg,
                    lock:true,
                    width:'200',
                    height:'50'
                },
                function(){
                    this.close();$(obj).focus();
                })
            }
        });
        $("#url").formValidator({
            empty:true,
            onshow:"请填写链接URL",
            onfocus:"请输入正确的url",
            oncorrect:"输入正确"
        }).regexValidator({
            regexp:"url",
            datatype:"enum",
            param:'i',
            onerror:"请输入正确的url"
        });

        $("#keyword").formValidator({
            empty:false,
            onshow:"请输入关键字",
            onfocus:"关键字必须是2-12个中文、数字、字母、下划线",
            oncorrect:"输入正确"
        }).inputValidator({
            min: 2, max: 12, onerror: "关键字长度为2-12,请确认"
        });
    })
    //-->
</script>
<div class="tablelist">
    <form name="myform" id="myform" action="{:U('Chain/insert')}" method="post">
        <input type="hidden" name="doclose" id="doclose" value="0">
        <input type="hidden" name="moduleid" value="{$moduleid}">
        <table width="100%" class="table_form contentWrap">
            <tr>
                <td width="120">关键词：</td>
                <td><input type="text" name="keyword" id="keyword" class="input-text"></td>
            </tr>
            <tr>
                <td>链接地址：</td>
                <td><input type="text" name="url" value="http://" id="url" class="input-text" size="40"></td>
            </tr>
            <tr>
                <td>窗口：</td>
                <td>
                    <select name="target">
                        <option value="_blank">新窗口</option>
                        <option value="_self">原窗口</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>状态：</td>
                <td>
                    <select name="status">
                        <option value="1">显示</option>
                        <option value="0">不显示</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>频率：</td>
                <td><input type="text" class="ipt1" name="number" value="1"></td>
            </tr>
        </table>
        <div class="btn">
            <input type="submit" id="dosubmit" class="button" name="dosubmit" value="提交" >
        </div>
    </form>
</div>
<include file="Public:footer" />